package face.pay.dao;

import face.pay.entity.SharingMchAccount;
import face.pay.vo.VSharingAccount;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;


@Mapper
public interface SharingAccountDao {

    VSharingAccount getAccount(@Param(value = "type") String type, @Param(value = "code") Integer code, @Param(value = "userId") Integer userId);

    void update(SharingMchAccount sharingMchAccount);


    /**
     * 查询商家应该关联的market分账对象
     *
     * @return
     */
    List<SharingMchAccount> queryNewMarketAccount();


    /**
     * 查询商家应该关联的oem分账对象
     *
     * @return
     */
    List<SharingMchAccount> queryNewOemAccount();

    /**
     * 查询商家应该关联的CPN分账对象
     *
     * @return
     */
    List<SharingMchAccount> queryNewCPNAccount();

    /**
     * 批量插入分账对象
     *
     * @param sourcesList
     */
    void insertlist(@Param("sourcesList") List<SharingMchAccount> sourcesList);
}
